function getTypeInfo(path) {
    $.post(
        `${path}/api/type/all`,
        {},
        (array) => {

            let json_array = JSON.parse(array)
            console.log("json_array", json_array)
            let element = json_array.map(item => {
                let typeElement =
                    `<li>
                    <span>${item.name}<b>></b></span>
                    <div class="nav_type_list" data="${item.id}">
                        <ul>
                        ${
                            item.secondaryTypeArray.map(c => {
                                return `<li><a href="${path}/product/like/${c.name}/1" target="_blank">${c.name}</a></li>`
                            })
                        }
                        </ul>
                    </div>
                </li>`

                return typeElement
            })
            $("#type_menu").html(element)
        }
    )
}
